<template>
  <div class="player-container">
    <div class="frosted-glass" style=""></div>
    <div class="player-inner-container">
      <div class="player-header">
        <a class="player-logo">
          <img src="../../assets/images/player/logo.png" alt="logo" />
        </a>
        <div class="player-search">
          <div class="player-switch">
            <p>沉浸</p>
            <div class="player-switch-dot"></div>
          </div>
          <div class="player-input-container">
            <input class="player-input" placeholder="搜索歌曲、歌手、MV" />
            <i class="iconfont icon-sousuo"></i>
          </div>
          <img src="../../assets/images/player/default-avatar.png" />
        </div>
      </div>
      <div class="player-body">
        <div class="player-body-left">
          <ul class="player-body-playlist">
            <li><p>默认播放列表</p></li>
            <li><p>喜欢的音乐</p></li>
            <li class="player-body-mysong"><p>我的歌单</p></li>
          </ul>
          <div class="player-body-songlist">
            <div></div>
            <p>歌单列表为空</p>
          </div>
        </div>
        <div class="player-body-center">
          <div class="player-body-center-menu">
            <button class="center-menu-add">
              <i class="iconfont icon-new"></i>添加到歌单
            </button>
            <button class="center-menu-dle">
              <i class="iconfont icon-shanchu"></i>删除
            </button>
          </div>
          <div class="player-body-center-allchecked">
            <div class="player-body-songleft">
              <div class="player-body-checkbox">
                <i class="iconfont icon-gou"></i>
              </div>
              <span class="player-body-index">全选</span>
              <span class="player-body-name">歌曲</span>
            </div>
            <div class="player-body-songright">
              <span class="player-body-singer">歌手</span>
              <span class="player-body-time">time</span>
            </div>
          </div>
          <div class="player-body-songlist-container scroll">
            <ul class="player-body-center-songlist">
              <li class="player-body-center-song active">
                <div class="player-body-songleft">
                  <div class="player-body-checkbox">
                    <i class="iconfont icon-gou"></i>
                  </div>
                  <span class="player-body-index">01</span>
                  <span class="player-body-name"
                    >遗失的心跳的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心</span
                  >
                </div>
                <div class="player-body-songright">
                  <span class="player-body-singer">萧亚轩</span>
                  <span class="player-body-time">time</span>
                </div>
              </li>
              <li class="player-body-center-song">
                <div class="player-body-songleft">
                  <div class="player-body-checkbox"></div>
                  <span class="player-body-index">01</span>
                  <span class="player-body-name"
                    >遗失的心跳的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心</span
                  >
                </div>
                <div class="player-body-songright">
                  <span class="player-body-singer">萧亚轩</span>
                  <span class="player-body-time">time</span>
                </div>
              </li>
              <li class="player-body-center-song">
                <div class="player-body-songleft">
                  <div class="player-body-checkbox"></div>
                  <span class="player-body-index">01</span>
                  <span class="player-body-name"
                    >遗失的心跳的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心</span
                  >
                </div>
                <div class="player-body-songright">
                  <span class="player-body-singer">萧亚轩</span>
                  <span class="player-body-time">time</span>
                </div>
              </li>
              <!-- 鼠标移动上去的时候显示 -->
              <li class="player-body-center-song">
                <div class="player-body-songleft">
                  <div class="player-body-checkbox"></div>
                  <i
                    class="player-body-index iconfont icon-bofangsanjiaoxing"
                  ></i>
                  <span class="player-body-name"
                    >遗失的心跳的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心跳遗失的心</span
                  >
                </div>
                <div class="player-body-songright">
                  <span>萧亚轩</span>
                  <div class="player-body-time player-body-icon">
                    <i class="iconfont icon-shanchu"></i>
                    <i class="iconfont icon-new"></i>
                    <i class="iconfont icon-fenxiang"></i>
                  </div>
                </div>
              </li>
            </ul>
          </div>
        </div>
        <div class="player-body-right">
          <div class="player-body-song-cover">
            <img src="../../assets/images/player/avatar1.jpg" />
            <div class="player-body-song-info">
              <p>歌曲名: 最熟悉的陌生人</p>
              <p>歌手名: 萧亚轩</p>
              <p>专辑名: 首选萧亚轩·美丽的插曲</p>
            </div>
          </div>

          <div class="player-body-song-lyric">
            <ul>
              <li>歌词歌词歌词歌词歌词歌词歌词</li>
              <li>歌词歌</li>
              <li class="lyric-height">歌词歌词歌词歌词歌词歌词歌词</li>
              <li>歌词歌词歌词歌词歌词歌词歌词</li>
              <li>歌词歌歌词歌词</li>
              <li>歌词歌词歌词歌词歌词歌词歌词</li>
              <li>歌词歌词歌词歌词歌词歌词歌词</li>
              <li>歌词歌</li>
              <li>歌词歌词歌词歌词歌词歌词歌词</li>
            </ul>
          </div>
        </div>
      </div>
      <div class="player-footer">
        <div class="player-footer-play">
          <button type="button" class="model">
            <i class="iconfont icon-Repeat"></i>
          </button>
          <button type="button" class="pre">
            <i class="iconfont icon-SkipBack"></i>
          </button>
          <button type="button" class="play">
            <i class="iconfont icon-Play"></i>
          </button>
          <!-- 暂停 -->
          <!-- <button type="button" class="pause">
          <i class="iconfont icon-Pause"></i>
        </button> -->
          <button type="button" class="next">
            <i class="iconfont icon-SkipForward"></i>
          </button>
        </div>
        <div class="player-footer-time">
          <div class="player-footer-block">
            <div class="player-footer-singinfo">
              <div>
                <span class="demonstration">热河</span> -
                <span class="demonstration">李志</span>
              </div>
              <div>
                <span class="demonstration">00:00</span> /
                <span class="demonstration">--:--</span>
              </div>
            </div>
            <el-slider class="slider" v-model="value1"></el-slider>
          </div>
        </div>
        <div class="player-footer-sound">
          <div class="player-footer-download">
            <i class="iconfont icon-xiazai"></i>
            <i class="iconfont icon-lingdang"></i>
            <i class="iconfont icon-aixin"></i>
          </div>
          <div class="player-footer-type">
            <span>标准 <i class="iconfont icon-shang"></i></span>
          </div>
          <div class="player-footer-volume">
            <i class="iconfont icon-SpeakerHigh"></i>
            <el-slider class="slider" v-model="value1"></el-slider>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { reqGetSongList } from "../../api/player/player.js";
export default {
  name: "Player",
  data() {
    return {};
  },
  async mounted() {
    // const res = await reqGetNewSong();
    // const data = {
    //   keyword: "周杰伦",
    //   type: "singer",
    //   // pageNo: 2,
    // };
    const data = await reqGetSongList();
    console.log(data);
  },
};
</script>

<style lang="less" scoped>
.player-container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  .frosted-glass {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-filter: blur(10px); //实现毛玻璃
    filter: blur(10px);
    background-image: url("../../assets/images/player/avatar1.jpg");
  }

  .player-inner-container {
    overflow: hidden;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
  }
}

// 头部
.player-header {
  flex-shrink: 0;
  display: flex;
  height: 70px;
  justify-content: space-between;
  // align-items: center;
  // background: #666;
  .player-logo {
    margin-left: 46px;
    margin-top: 29px;
    flex-shrink: 0;
    img {
      width: 90px;
      height: 26px;
    }
  }
  .player-search {
    display: flex;
    height: 40px;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;

    .player-switch {
      position: relative;
      border: 1px solid #c2c2c2;
      width: 57px;
      border-radius: 12px;
      margin-right: 20px;
      p {
        padding-left: 6px;
        height: 22px;
        line-height: 22px;
        color: #c2c2c2;
        font-size: 12px;
      }
      .player-switch-dot {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: 2px;
        width: 19px;
        height: 19px;
        border-radius: 50%;
        background-color: #c2c2c2;
      }
    }
    .player-input {
      width: 300px;
      height: 40px;
      border-radius: 20px;
      margin-right: 60px;
      border: none;
      background: #f2f2f2;
      &::-webkit-input-placeholder {
        color: rgba(21, 30, 38, 0.35);
        padding-left: 20px;
      }
    }
    .player-input-container {
      position: relative;
      .icon-sousuo {
        position: absolute;
        top: 50%;
        left: 260px;
        transform: translateY(-50%);
        cursor: pointer;
      }
      // .icon-sousuo:before:hover {
      //   // border-color: #e91e63;
      //   color: #e91e63;
      // }
    }

    img {
      width: 40px;
      height: 40px;
      margin-right: 60px;
    }
  }
}

//中部
.player-body {
  height: 100%;
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  .player-body-left {
    width: 200px;
    // background-color: darkcyan;
    flex-shrink: 0;
    .player-body-playlist {
      padding-top: 30px;
      padding-left: 60px;
      padding-bottom: 20px;
      font-size: 16px;
      li {
        height: 66px;
        line-height: 66px;
        &:hover {
          border-color: #e91e63;
          color: #e91e63;
          cursor: pointer;
        }
      }
      .player-body-mysong {
        color: #7f7f7f;
        &:hover {
          border-color: none;
          color: #7f7f7f;
          cursor: default;
        }
      }
    }
    .player-body-songlist {
      margin-left: 60px;
      // position: relative;
      // white-space: nowrap;
      // border-top: 1px solid red;
      div {
        width: 50px;
        height: 1px;
        border-top: 1px solid hsla(0, 0%, 100%, 0.1);
      }
      p {
        padding-top: 20px;
        // position: absolute;
        // top: 0;
        // left: 0;
      }
    }
  }
  .player-body-center {
    flex-grow: 1;
    height: 100%;
    .player-body-center-menu {
      position: relative;
      .center-menu-add,
      .center-menu-dle {
        height: 36px;
        line-height: 36px;
        border: 1px solid #aeaeae;
        padding: 0 23px;
        display: inline-block;
        margin-right: 20px;
        border-radius: 25px;
        cursor: pointer;
        background-color: hsla(0, 0, 0, 0.2);
      }
      .center-menu-add:hover,
      .center-menu-dle:hover {
        border-color: #e91e63;
        color: #e91e63;
      }
      .center-menu-add {
        margin-left: 30px;
        padding-left: 40px;
      }
      .center-menu-dle {
        padding-left: 35px;
      }
      .icon-shanchu,
      .icon-new {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
      }
      .icon-new {
        left: 50px;
      }
      .icon-shanchu {
        left: 200px;
      }
    }
    .player-body-center-allchecked {
      margin-left: 30px;
      padding: 30px 0;
      // padding-right: 21px;
      // background: darkgoldenrod;
      color: #857b76;
      display: flex;
      justify-content: space-between;
      .player-body-index {
        margin: 0 20px;
      }

      .player-body-songleft {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        width: 300px;
        .player-body-checkbox {
          flex-shrink: 0;
        }
        .player-body-index {
          width: 30px;
        }
      }
      .player-body-songright {
        display: flex;
        justify-content: space-between;
        width: 200px;
        flex-grow: 0.5;
        .player-body-time {
          padding-right: 100px;
          text-align: right;
        }
        span {
          flex-grow: 0.5;
        }
        .player-body-singer {
          width: 100px;
        }
        .player-body-icon {
          display: flex;
          flex-direction: row-reverse;
          justify-content: space-between;
        }
      }
    }
    .player-body-songlist-container {
      height: 100%;
      overflow: auto;
      .player-body-center-songlist {
        .player-body-center-song {
          display: flex;
          justify-content: space-between;
          width: 100%;
          height: 100%;
          position: relative;
          // color: #fefefe;
          cursor: default;
          box-sizing: border-box;
          line-height: 50px;
          .player-body-icon {
            width: 80px;
            margin-left: 0;
          }

          .player-body-songleft {
            display: flex;
            align-items: center;
            flex-shrink: 0;
            width: 350px;
            margin-left: 30px;
            .player-body-checkbox {
              flex-shrink: 0;
            }
            .player-body-name {
              white-space: nowrap;
              text-overflow: ellipsis;
              overflow: hidden;
            }
            .player-body-index {
              width: 30px;
              margin: 0 20px;
              flex-shrink: 0;
            }
          }

          .player-body-songright {
            display: flex;
            justify-content: space-between;
            flex-grow: 0.5;
            width: 240px;
            .player-body-time {
              margin-right: 100px;
              text-align: right;
            }
            span {
              flex-grow: 0.5;
            }
            .player-body-singer {
              width: 100px;
            }
            .player-body-icon {
              display: flex;
              flex-direction: row-reverse;
              justify-content: space-between;
            }
          }
          .iconfont:hover {
            border-color: #e91e63;
            color: #e91e63;
            cursor: pointer;
          }
          .icon-gou:hover {
            border-color: #ffffff;
            color: #ffffff;
            cursor: pointer;
          }
        }
        // 鼠标移上去的时候高亮
        .active {
          background-color: hsla(0, 0%, 60%, 0.2);
        }
      }
    }
    .scroll {
      &::-webkit-scrollbar {
        width: 5px;
        height: 6px;
      }
      &::-webkit-scrollbar-thumb {
        background-color: hsla(0, 0%, 100%, 0.2);
        border-radius: 5px;
      }
      &::-webkit-scrollbar-track {
        background: 0 0;
      }
    }
    .player-body-checkbox {
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 2px solid #3e3d3e;
      background-color: rgba(0, 0, 0, 0);
      position: relative;
      .icon-gou {
        position: absolute;
        top: 50%;
        left: -2px;
        transform: translateY(-50%);
        cursor: pointer;
      }
    }
  }
  .player-body-right {
    flex-grow: 0.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    padding-bottom: 30px;
    color: #7f7f7f;

    .player-body-song-cover {
      flex-grow: 0;
      padding-top: 20px;
      img {
        width: 200px;
        height: 200px;
      }
      .player-body-song-info {
        text-align: center;
        padding-top: 30px;
        p {
          height: 30px;
        }
      }
    }
    .player-body-song-lyric {
      flex-grow: 1;
      li {
        text-align: center;
      }
      .lyric-height {
        color: #fff;
      }
    }
  }
}

//底部播放器
.player-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 110px;
  padding-left: 120px;
  padding-right: 60px;
  .player-footer-play {
    flex-shrink: 0;
    button {
      background-color: rgba(0, 0, 0, 0);
      border: none;
    }
  }
  .player-footer-time {
    flex-grow: 1;
    margin: 0 30px;
    .slider {
      min-width: 140px;
    }
    .player-footer-singinfo {
      display: flex;
      justify-content: space-between;
      & > div {
        flex-shrink: 0;
      }
    }
  }
  .player-footer-sound {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    .player-footer-download {
      display: flex;
      justify-content: space-between;
      width: 108px;
    }

    .player-footer-type {
      width: 88px;
      height: 30px;
      line-height: 30px;
      margin: 0 20px;
      border-radius: 20px;
      background-color: hsla(0, 0%, 100%, 0.1);
      text-align: center;
      cursor: pointer;
      font-size: 12px;
    }

    .player-footer-volume {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .slider {
        width: 100px;
        margin-left: 15px;
      }
    }
  }
}
</style>